// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import './assets/css/global.css'


//公共样式
import "@/style/common.less";

Vue.config.productionTip = false

// 引入element
import 'element-ui/lib/theme-chalk/index.css';
import Element from 'element-ui';

Vue.use(Element);

import 'echarts-gl';

// 引入echarts
import echarts from 'echarts'

Vue.prototype.$echarts = echarts;


//注册过滤器
Vue.filter("stringTrim", (val) => {
    if (val) {
        return val
    } else {
        return '--'
    }
});

//注册过滤器
Vue.filter("toArray", (val) => {
    let arr = [];
    if (val) {
        arr.push(val)
    }
    return arr;
});

Vue.filter("timestampFormat", (val) => {
    if (val) {
        return timestampFormat(val)
    }
});

new Vue({
    router,
    render: h => h(App)
}).$mount("#app")
